import config from "@/config";
import http from "@/utils/request";

export default {
	todopage: {
		url: `${config.API_URL}/prodwoschedule/todopages/`,
		name: "待排产的工单分页",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	donepage: {
		url: `${config.API_URL}/prodwoschedule/donepages/`,
		name: "已排产的工单分页",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	schedule: {
		url: `${config.API_URL}/prodwoschedule/schedule/`,
		name: "排产",
		post: async function(data){
			return await http.post(this.url, data);
		}
	},
	unschedule: {
		url: `${config.API_URL}/prodwoschedule/unschedule/`,
		name: "取消排产",
		post: async function(data){
			return await http.post(this.url, data);
		}
	},
	sort: {
		url: `${config.API_URL}/prodwoschedule/sort/`,
		name: "排序",
		put: async function(data){
			return await http.put(this.url, data);
		}
	},
}
